Principal fields are placeholders for block model and calculated data; they are used throughout XECUTE. Principal fields:
The following steps outline the creation of user principal fields.

 ) to add a new principal field.
) to add a new principal field. 
System Principal Fields
Pre-defined principal fields are created for system use, only the Units and Decimal place options are editable. See XECUTE field reference for details on where these fields are available in reports and data feed out.
| Field | Description | 
|---|---|
| AvgFlrElevation | The average elevation of the floor of the activity area slice. Taken from the average of the minZ at the centroid the slice solids or the minZ of all vertices. | 
| AvgThk | The average thickness of the activity area slices (Plan Area / Volume). | 
| Density | Density from the block model mapping field. | 
| GradeControlIntersectionPercent | The percentage of the grade control volume that intersects with the block volume. | 
| Mass | The block volume * block density. | 
| PlanArea | The area of the activity area slice solid silhouette. | 
| Volume | The volume of the block. | 
| Volume_Swollen | The volume of the block material after the swell factor has been applied. | 
Principal field configuration options
| Field | Description | 
|---|---|
| Code | The principal field code (used as an identifier) must be unique. The name is checked for invalidated characters | 
| Description | A description of the field. | 
| Category | Principal fields with the same Category name are grouped together in the block model mapping screen. Category names also group principal fields in the Reporting tab. Category names are case-sensitive and can contain spaces. A system-generated category, Default, is used to group the system principal fields. | 
| Units | The unit of the principal field (used for display purposes only). | 
| Field Type | The data type of the principal field, either numbers or text. | 
| Aggregation Type | How the principal field values will be aggregated within an activity area. Types include None, Sum, Min, Max, Weight Average, Aggregated Evaluation. Blocks are first aggregated per material within an activity area slice and then the slice values are aggregated.  | 
| Weighting Field | For Weight Average aggregation type, the weighting field to be applied. | 
| Decimal | The number of decimal places displayed for numeric principal field types. Internally, all calculations are performed at full precision. | 
| Default Value | The default value of the field if its value can not be determined. For example: 
 | 
| Expression | Option for the principal field to be based on an expression rather than a block model field mapping. See Expression. | 
| Evaluation Level | If expressions are used you can set the level at which the reserving calculations are performed. The options are block (default) or slice level. For this option to be visible, the Aggregation Type must not be Aggregated Evaluation. The block level evaluates (applies the expression) for each block in the block model and aggregates the evaluated (expression) results. The slice level applies the expression to the aggregated blocks in the slice, see Activities. | 
| Evaluation Type | For Expression based principal fields with Evaluation Level set to Slice an additional setting appears to set the Evaluation Type. Slice Total Expression - expressions will be applied at the slice level; fields that are available for use in the expression are grouped into Principal Fields, Name Fields, Material Fields and Area Fields. Use this option when working with the spatial fields; AvgFlrElevation, AvgTK, GradeControlIntersectionPercent, PlanArea. See Expression for details on Field groups. Material-Based Expressions - expressions will be applied per material at the slice level. The available fields include the groups Principal Fields and Name Fields but excludes the spatial fields mentioned above. | 
#Spatial Fields - AvgFlrElevation, AvgTk, GradeControlIntersectionPercent, PlanArea
| Aggregation Type | Field Category (EB) | Evaluation Level | Evaluation Type | Spatial Fields# | Notes | 
|---|---|---|---|---|---|
| None, Sum, Min, Max, Weight Average | Principal Fields, Name Fields | Block | NA | NA | Only Sum and Weight Average types can be used as accumulation fields with Product Optimiser. | 
| None, Sum, Min, Max, Weight Average | Principal Fields | Slice | Material-Based and Slice Total Expression | Only for Slice Total Expression evaluation type | Slice evaluation level fields are NOT available as Product Optimiser (moves material) fields. | 
| None, Sum, Min, Max, Weight Average | Name Fields | Slice | Material-Based and Slice Total Expression | NA | |
| None, Sum, Min, Max, Weight Average | Material Fields | Slice | Slice Total Expression | NA | |
| None, Sum, Min, Max, Weight Average | Area Fields | Slice | Slice Total Expression | NA | |
| Aggregated Evaluation | Principal Fields, Name Fields | (Evaluated at level used) | NA | No | Aggregated Evaluation fields are NOT available as Product Optimiser fields nor can they be used in expressions for Product Optimiser fields. | 
To illustrate the different levels of evaluation, a stylised example is used where we compare the weight averaged block model mapped Au to an auTest field that has an aggregation type to return the maximum value. The auTest test field is assigned different options to illustrate the level of evaluation and the scope of the aggregated blocks.
The principal field to hold the weight averaged gold value that has been mapped to the block model Au field.
             
        
The auTest principal field uses the Max Aggregation Type to return the maximum value of the blocks to be evaluated. An expression is used to return the value to be aggregated. The expression is evaluated at various levels shown in the table below. In each case the expression simply references the Au field which is defined above.
             
        
| Evaluation Level | Evaluation Type | auTest Expression | Compare Au to auTest fields | 
|---|---|---|---|
| Block | NA | Principal Fields \ Au | Get the weight averaged Au value of each block then apply the aggregation type. This will be the maximum value for all blocks in the activity area (specific block shown below) 
                             
                             | 
| Slice | Material based | Principal Fields \ Au | Get the weight averaged Au value of blocks for each material in each slice then aggregate (return the maximum value of the slices). The slice below has the highest weight average Au but is less than the block evaluation example above because it is averaged over two blocks. 
                             
                             Fewer slices will weight average over a larger area and may include blocks with lower Au (green block lower left) and lead to a lower aggregate (Max) value. 
                             In the example below each material of each slice is evaluated using their expression (constants in this case) and the aggregated value (Max) of each slice is aggregated up to the activity area. PAG only has to occur in one slice of the activity area for that value to be returned as the Max aggregated value. 
                             
                             | 
| Slice | Slice total | Principal Fields \ Au | Get the weight averaged Au value for all blocks in each slice then aggregate (Max) the slice values. 
                             | 
| Slice | Slice total | Material Fields \ LGSx_Au | Get the weight averaged Au value for all blocks of the LGSx material in each slice then aggregate (Max) the slice values. As expected the maximum Au is lower due to the lower grade material over which to evaluate. 
                             | 
| Slice | Slice total | Area Fields \ Area_Total_Au | Get the weight averaged Au value for all blocks in the activity area. This is the same as the block level aggregation value (Au field). 
                             | 
| Slice | Slice total | Area Fields \ LGSx_Au | Get the weight averaged Au value for all blocks of the LGSx material in the activity area. 
                             | 
Principal fields used in activity types that move material (the principal field is used in the Quantity Field of the activity type)
A principal field for mining activities, such as an accumulation field for an activity that moves material. Typically the field is mapped directly from the block model (Use Expression - No), Expressions (block level) can also be used to modify the block data, however those expressions can not use fields that have an Aggregated Evaluation aggregation type. The Aggregation Type of the principal field must be Sum or Weight Average and the field is tracked by Product Optimiser.
Typically the field is mapped directly from the block model (Expression - No). To modify the block data click Expression Yes and build an expression to return numeric data. the required data.
Note:
For principal fields to be a quantity field of an activity type that moves material, the aggregation type can only be Sum type.
Once a field is used as a quantity field in an Activity Type its Aggregation type can not be changed.
If an expression is used for a quantity field it can not contain other principal fields that have an Aggregated Evaluation aggregation type.
A principal field for drilling activities will use an quantity accumulation field that does NOT move material.
Drill metres, for example, are determined from the thickness and area of the activity and the drill hole pattern dimensions. The burden and spacing may be influenced by the underlying geology within the activity area. In this case, Aggregation type of Sum and an Evaluation Level of Slice will make PlanArea field available. The expression PlanArea*AvhTk/BurdenSpacing could be used where BurdenSpacing could be directly entered as values or reference a BurdenSpacing principal field
Drill metres, for example, are determined from the thickness and area of the activity and the drill hole pattern dimensions. The drill metres can be found for the activity area by general expression area(m2)/ burden*spacing(m2) * thickness.
The burden and spacing may be influenced by the underlying geology within the activity area and can be calculated by several methods. In this example a slice level material based expression is used to apply a different spacing for Waste material. All other materials will use the Default Expression, however an expression could be set for each material.
             
        
To calculate the drill metres another expression field is used that operates at the slice level and sums the result of each slice. Sum aggregation type is required as DrillMetres will be used in the quantity field for Production Drilling activity type.
PlanArea - the plan area of each slice of the activity area.
BurdenSpacing - the calculated field above
AvgTk - the average thickness of each slice of the activity area.
             
        
To check your expressions enable the fields to appear in the Activity Areas tab, do this by ticking the fields in the Relevant fields list of the activity type and save changes. The image below shows the drill metre expression operating at the slice level
             
        
Review the field values in the Activity Areas tab
             
        
Principal fields can be modified by using expressions within the Expression Builder tool. The configured expression can reference other principal fields, or assign static values. The expression is evaluated for each block in the block model and aggregated based on the Aggregation Type. Expressions can also be set to evaluate at the slice level.
In XECUTE the default behaviour is to assign values to the principal fields from the block model mappings. The block values are then aggregated up to the slice level based on the aggregation type. The number of slices is defined per activity type and allows reserves to be calculated as the mining face progresses along the mining direction. The slices are created perpendicular to the mining direction. Ultimately the slice reserves are aggregated up to the activity area.
Expressions allow derived values to be used in reserving and together with the Evaluation level options you can control when the expressions are applied in the reserving process.
To use expressions:
Click Save to save the newly created principal field expression, or click the  button to save the current item and create a new one.
 button to save the current item and create a new one.
Fields by Category
Principal fields are grouped by the following types depending on the selected Evaluation Type. Select a filter group or Search for a Principal field name (search uses fuzzy match).
Principal Fields
Available in expressions for all principal field configurations and includes all principal fields except spatial fields; AvgFlrElevationPlanArea, or AvgTK, GradeControlIntersectionPercent, PlanArea.
The spatial fields are only available for Evaluation Level (slice) > Evaluation Type (Slice Total Expression) expressions.
Name Fields
The expression builder in XECUTE Config can make use of fields that refer to spatial entries. The Name Fields tab lists the spatial entities; Activity, ActivityArea, MiningLevel, Pit.
Example:
Using the Select function, Select(seed, defaultValue, key1, value1, key2, value2 ...)
Select(Pit,1,NorthPit,55,SouthPit,22).
The return value of the expression (evaluated for each block and aggregated as per the Aggregation Type set for the principal field) will return 55 if the block is in the NorthPit, 22 if in the SouthPit and 1 if not in any pit. The pit extents are defined by the pit limits associated with the Pit node in the material flow diagram.
The expression builder dialog has information about each function.
Material Fields
These fields are available when Evaluation Type is set to Slice Total Expression. The fields represent the principal field value per material and are named in the format materialName_principalField.
Blocks are first evaluated by material rules to assign a material then reserved to obtain the principal field value.
Area Fields
These fields are available when Evaluation Type is set to Slice Total Expression. The fields represent the principal field value per material for the activity area slice and are named in the format Area_materialName_principalField. There are also Area_Total fields that represent the principal field value for all blocks in the activity area so that expressions at the slice level can reference activity area level values.
Functions by Category
The functions are grouped by type, select a group or Search for a function name (fuzzy match).
| Math Function | Output | Description | Example | 
|---|---|---|---|
| Abs(number) | Double | Returns the absolute value of a number without its sign. | Abs(3) | 
| Atn(number) | Double | Returns the arctangent of a number in radians, in the range - Pi/2 to Pi/2. | Atn(3.14) | 
| CDate(dateString) | Date | Returns the converted date value using the specified culture - see below. Returns #1/1/0001# if conversion failed. | CDate("25 march 2020") | 
| CDate(dateString.cultureSharing. | Date | Returns the converted date value using the specified culture, such as "en-US" for English (United States), "en-AU" for English (Australia) or "ru-RU" for Russian (Russia). Returns #1/1/0001# if conversion failed. | CDate("25 march 2020"."en-US") | 
| CDbl(numberString) | Double | Returns the converted double value using current computer culture. Returns 0 if conversion failed. | CDbl("3.14159") | 
| CDbl(numberString, cultureString) | Double | Returns the converted double value using the specified culture, such as "en-US" for English (United States), "en-AU" for English (Australia) or "ru-RU" for Russian (Russia). Returns 0 if conversion failed. | CDbl("3.14159", "en-AU") | 
| Choose(index, choice1, choice2, ...) | Selects and returns a value from a list of arguments. The first parameter is the 1 based index of the value from the choice list to return. The subsequent parameters are the choices to choose from. If the index parameter is less than 1 or greater than number of choices, a default value returned. | Choose(Round(AvgTk,0),0,2,5,10) if the rounded average thickness Round(AvgTk,0) of an activity area is 3, then return 5. | |
| Cos(number) | Double | Returns the cosine of an angle measure in radians. | Cos(1.57) | 
| CStr(object) | Sting | Returns the string equivalent of a number or Boolean value. | CStr(3.14159) | 
| CStr(object, cultureString) | String | Returns the string (with the specified culture) equivalent of a number or Boolean value. | |
| DateTime(year, month, day) | String | Returns the DateTime string given the set of date components. | |
| DateTime(year, month, day) | String | Returns the DateTime string given the set of date components. | |
| DateTime(year, month, day, hour, minute, second) | String | Returns the DateTime string given the set of date/time components. | |
| Day(dateTime) | Returns a whole number from 1 to 31 indicating the day of the month of the given date. | ||
| Day(timeSpan) | Returns the whole day part of the time span. | ||
| Exp(number) | Double | Returns the exp raised to the power of a given number. | Exp(2) | 
| Fix(number) | Integer | Returns the integer portion of a floating point number. | Fix(6.53) | 
| IIF(logicalTest, valueIfTrue, valueIfFalse) | Boolean | Returns one value if the specified condition evaluates to True and another if it evaluates to False. | IIF(5>3, 5, 3) | 
| Int(number) | Integer | Rounds a number down to the nearest integer. | Int(3.53) | 
| IsNaN | Boolean | Returns True if the specified value is not a number(NaN); otherwise False. | |
| Log(number) | Double | Returns the natural logarithm of a number. | Log(7) | 
| Log2(Number) | Double | Returns the base 2 logarithm of a number. | |
| Log10(Number) | Double | Returns the base 10 logarithm of a number. | |
| Max(number, number) | Double | Returns the larger of the two double values. | Max(2, 5) | 
| Min(number, number) | Double | Returns the smaller of the two double values. | MinI(48, 13) | 
| Round(number, numberOfDecimals) | Double | Rounds the number to the specified number or decimals. | |
| SafeDivide(number1, number2) | Double | Returns 0 if number2 is 0; otherwise returns the result of number1 divided by number2. | SafeDivide(5,0) | 
| Select(seed, defaultValue, key1, Value1, key2, value2, ...) | The first parameter is the Seed parameter. The second parameter indicates the Default Value to return if no match was found. The subsequent parameters are in Key, Value pairs. If the Seed parameter matches with one of the Key parameters, the function returns Value parameter. | Select(Pit,1,"NorthPit",55,"SouthPit",22) if value of the Name Field 'Pit' = "NorthPit" then return 55 | |
| Sgn(number) | Integer | Returns the sign of a number: 1 if the number is positive, zero if the number is zero, or -1 if the number is negative. | Sgn(-3.5) | 
| Sin(number) | Integer | Returns the sine of an angle measured in radians. | Sin(1.57) | 
| Sqr(number) | Double | Returns the square root of the number. | Sqr(4) | 
| Tan(number) | Double | Returns the tangent of an angle measured in radians. | Tan(0) | 
| String Function | Output | Description | Example | 
| CStr(object,cultureString) | |||
| GetStringPart(string, string1, number) | String | Returns a sub-section of a ‘string’ based on the given index ‘number’ and the characters in the delimiter string (string1). | GetStringPart(“ksgm_pit2_pback4”,”_”,3) returns pback4 | 
| InStr(start, string1, string2) | Integer | Returns an integer specifying the start position of the first occurrence of one string within another. Start is 1-based. | InStr(0, "im", "minimum") | 
| LCase(string) | Double | Returns the absolute value of a number, a number without its sign. | LCase("A String") | 
| Left(string, length) | String | Returns a string that contains a specified number of characters from the side of a string. | Left("capacity", 3) | 
| Len(string) | Integer | Returns the length of a string. | Len("maximum") | 
| Mid(string, start, length) | String | Returns a string that contains a specified number of characters from a string. Start is 1-based. | Mid("capacity", 3, 2) | 
| Replace(string, string1, string2) | String | Replaces all occurrences of a specified substring with another substring. | Replace("capacity", "a", "e") | 
| Right(string, length) | String | Returns a string that contains a specified number of characters from the right side of a string. | Right("thickness", 2) | 
| UCase(string) | String | Returns a string that has been converted to uppercase. | UCase("capacity") | 
| Operators | Inputs | Description | Example | 
| + | Double, DateTime, TimeSpan and String | The sum of two values. A TimeSpan can be added to a DateTime, returning a DateTime. When used with two strings, the result will be the concatenated string. | |
| - | Double, DateTime, and TimeSpan | The remainder of one value subtracted from the other. If a DateTime is subtracted from a DateTime, the result is a TimeSpan. | |
| * | Only accepts Doubles | The result of the multiplication of two values. | |
| / | Only accepts Doubles | The result of the division of two values. | |
| ^ | Only accepts Doubles | The result of a value raised to a power. | |
| = | Double, Boolean, DateTime and String | Returns True if the two objects have the same value, otherwise returns False. | |
| < | Double, DateTime and TimeSpan | Returns True if the first object is less than the second object, otherwise returns False. | |
| <= | Double, DateTime and TimeSpan | Returns True if the first object is less than or equal to the second object, otherwise returns False. | |
| >= | Double, DateTime and TimeSpan | Returns True if the first object is greater than or equal to the second object, otherwise returns False. | |
| > | Double, DateTime and TimeSpan | Returns True if the first object is greater than the second object, otherwise returns False. | |
| <> | Double, DateTime TimeSpan and String. | Returns True if the two objects have a different value, otherwise returns False. | |
| Is | Only accepts Records | Returns True if the values are the same, otherwise returns False. | |
| And | Only accepts Booleans. | Returns True if the values are the same, otherwise returns False. | |
| Or | Only accepts Booleans. | Returns True if one or both expressions are True. Returns False if both expressions are False. | |
| Not | Only accepts Booleans | Returns True if the result of the expression is False. Returns False if the result of the expression is True. | |
| Mod | Only accepts Doubles | Mod Only accepts Doubles. Returns the remainder of value 1 divided by value 2. |